package com.liruo.treasureattic.common.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.liruo.treasureattic.common.model.constant.TreasureAtticConstant;
import com.liruo.treasureattic.common.model.enume.GenderEnum;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 
 * @TableName user
 */
@TableName(value ="ta_user")
@Data
public class User implements Serializable {
    /**
     * 
     */
    @TableId(type=IdType.AUTO)
    private Long id;

    /**
     * min=4,max=16
     */
    private String username;

    /**
     *
     */
    private String email;

    /**
     * 8-64
     */
    private String pwd;

    /**
     * max=2048
     */
    private String avatarUrl;

    /**
     * 0-男,1-女
     */
    private GenderEnum gender;

    private Integer followCnt;
    private Integer followerCnt;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    private Long created;

    /**
     *
     */
    private Long updated;

    /**
     * 1-合法
     */
    private Integer valid;
    @TableLogic
    private Boolean deleted;
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = TreasureAtticConstant.TREASURE_ATTIC_VERSION;
}